#include"EpollServer.hpp"
#include<iostream>
#include<string>
#include<memory>
using namespace std;

void Usage(string process)
{
    cerr<<"Usage:\n"<<process<<"    port"<<endl;
}
//./epoll_server 8888
int main(int argc,char* argv[])
{
    if(argc!=2)
    {
        Usage(argv[0]);
        return 1;
    }

    uint16_t port=stoi(argv[1]);
    unique_ptr<EpollServer> svr=make_unique<EpollServer>(port);
    svr->InitServer();
    svr->Loop();
    return 0;
}